<%@ page import="org.apache.ibatis.jdbc.Null" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="utf-8" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="cp" value="${pageContext.request.contextPath}"/>

<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>购物+</title>
  <link href="${cp}/css/bootstrap.min.css" rel="stylesheet">
  <link href="${cp}/css/style.css" rel="stylesheet">
  <script src="${cp}/js/jquery.min.js" type="text/javascript"></script>
  <script src="${cp}/js/bootstrap.min.js" type="text/javascript"></script>
  <script src="${cp}/js/layer.js" type="text/javascript"></script>
  <!--[if lt IE 9]>
  <script src="${cp}/js/html5shiv.min.js"></script>
  <script src="${cp}/js/respond.min.js"></script>
  <![endif]-->
</head>
<body>
<!--导航栏部分-->
<jsp:include page="include/header.jsp"/>

<!-- 中间内容 -->
<div class="container-fluid" style="padding-top: 80px;padding-bottom: 80px">

  <c:if test="${msgs != null}">
    <div class="alert alert-danger">
      <a href="#" class="alert-link">${msgs}</a>
    </div>
  </c:if>

  <h1 class="title center">登录</h1>
  <br/>
  <div class="col-sm-offset-2 col-md-offest-2">
    <!-- 表单输入 -->
    <form action="${cp}/user_main/login.do">
      <div class="form-horizontal">
        <div class="form-group">
          <label for="inputUsername" class="col-sm-2 col-md-2 control-label">用户名</label>
          <div class="col-sm-6 col-md-6">
            <input type="text" class="form-control" id="inputUsername" name="username" placeholder="请输入正确的用户名"/>
          </div>
        </div>
        <div class="form-group">
          <label for="inputPassword" class="col-sm-2 col-md-2 control-label">密码</label>
          <div class="col-sm-6 col-md-6">
            <input type="password" class="form-control" id="inputPassword" name="password" placeholder="禁止输入非法字符"/>
          </div>
        </div>

        <div class="form-group">
          <div class="col-sm-offset-2 col-sm-6">
            <button class="btn btn-lg btn-primary btn-block" type="submit" onclick="startLogin()">登录</button>
          </div>
        </div>
      </div>
    </form>
    <br/>
  </div>
</div>

<!--尾部-->
<jsp:include page="include/foot.jsp"/>

<script type="text/javascript">
  function startLogin() {
    layer.load(0);
  }
  $(function(){
    setInterval(show,3000);// 注意函数名没有引号和括弧！
    function show(){
      $.session.remove("msgs");
    }// 使用setInterval("show()",3000);会报“缺少对象”
  });
</script>

</body>
</html>